package com.kksoft.readcm.a;

import android.database.Cursor;
import android.database.SQLException;
import android.os.AsyncTask;
import com.kksoft.readcm.activity.App;
import com.kksoft.readcm.objects.ErrorReport;
import com.kksoft.readcm.objects.l;
import com.kksoft.readcm.objects.n;
import com.kksoft.readcm.objects.w;
import java.util.concurrent.atomic.AtomicBoolean;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONException;
import org.json.JSONObject;

final class aa extends AsyncTask
{
  private int a;
  private ErrorReport b = null;
  private boolean c;

  public aa(LoginAppObservable params, int paramInt, boolean paramBoolean)
  {
    this.a = paramInt;
    this.c = paramBoolean;
  }

  private Integer a()
  {
    try
    {
      //s Integer localInteger1 = Integer.valueOf(b());
      //s localInteger2 = localInteger1;
      //s return localInteger2;
    	return Integer.valueOf(b());
    }
    catch (Throwable localThrowable)
    {
      while (true)
        //s Integer localInteger2 = Integer.valueOf(-1);
    	  return Integer.valueOf(-1);
    }
  }

  private int b()
  {
	return 0;
   /*
	  JSONObject localJSONObject1 = new JSONObject();
    JSONObject localJSONObject2 = new JSONObject();
    JSONObject localJSONObject3 = new JSONObject();
    JSONObject localJSONObject4 = new JSONObject();
    JSONObject localJSONObject5 = new JSONObject();
    JSONObject localJSONObject6 = new JSONObject();
    Object localObject1 = new JSONObject();
    //n localn1 = this.d.c.a();
    //n localn2 = 0;
    try
    {
      //Cursor localCursor = this.d.e.f();
      while (true)
      {
        if (!localCursor.moveToNext())
        {
          localCursor.close();
          //localn1 = localn2;
          this.d.m.set(0);
          if ((localJSONObject1.length() <= 0) && (localJSONObject2.length() <= 0) && (localJSONObject3.length() <= 0) && (localJSONObject4.length() <= 0) && (localJSONObject5.length() <= 0) && (localJSONObject6.length() <= 0) && (((JSONObject)localObject1).length() <= 0))
            break label1075;
          Appconfig localaf = this.d.b;
          DefaultHttpClient localDefaultHttpClient = this.d.j.k;
          //localObject1 = new w(localaf, 2, 1, localDefaultHttpClient);
          if (localJSONObject1.length() > 0)
          {
            String str1 = localJSONObject1.toString();
            BasicNameValuePair localBasicNameValuePair1 = new BasicNameValuePair("new", str1);
            ((w)localObject1).a(localBasicNameValuePair1);
          }
          if (localJSONObject2.length() > 0)
          {
            String str2 = localJSONObject2.toString();
            BasicNameValuePair localBasicNameValuePair2 = new BasicNameValuePair("read", str2);
            ((w)localObject1).a(localBasicNameValuePair2);
          }
          if (localJSONObject3.length() > 0)
          {
            String str3 = localJSONObject3.toString();
            BasicNameValuePair localBasicNameValuePair3 = new BasicNameValuePair("delete", str3);
            ((w)localObject1).a(localBasicNameValuePair3);
          }
          if (localJSONObject4.length() > 0)
          {
            String str4 = localJSONObject4.toString();
            BasicNameValuePair localBasicNameValuePair4 = new BasicNameValuePair("update_title", str4);
            ((w)localObject1).a(localBasicNameValuePair4);
          }
          if (localJSONObject5.length() > 0)
          {
            String str5 = localJSONObject5.toString();
            BasicNameValuePair localBasicNameValuePair5 = new BasicNameValuePair("update_tags", str5);
            ((w)localObject1).a(localBasicNameValuePair5);
          }
          if (localJSONObject6.length() > 0)
          {
            String str6 = localJSONObject6.toString();
            BasicNameValuePair localBasicNameValuePair6 = new BasicNameValuePair("position", str6);
            ((w)localObject1).a(localBasicNameValuePair6);
          }
          ((w)localObject1).a();
        }
        switch (((w)localObject1).b())
        {
        case 2:
        default:
          ErrorReport localErrorReport = ((w)localObject1).d();
          this.b = localErrorReport;
          //s i = -1;
          //s return i;
          return -1;
          int j = localCursor.getColumnIndex("rowid");
          n localn3 = localCursor.getInt(j);
          if (localn2 < localn3)
            localn2 = localn3;
          int k = localCursor.getColumnIndex("type");
          String str7 = localCursor.getString(k);
          int m = localCursor.getColumnIndex("url");
          localObject2 = localCursor.getString(m);
          locall = localn1.a((String)localObject2, 1);
          if ((locall == null) && (!str7.equals("delete")))
          {
            boolean bool1 = str7.equals("read");
            if (!bool1)
              continue;
          }
          if (locall != null)
            break label690;
          try
          {
            localJSONObject7 = new JSONObject();
            if (!str7.equals("new"))
              break label704;
            JSONObject localJSONObject8 = localJSONObject7.put("url", localObject2);
            String str9 = locall.k();
            JSONObject localJSONObject9 = localJSONObject7.put("title", str9);
            String str10 = String.valueOf(i.length());
            JSONObject localJSONObject10 = i.put(str10, localJSONObject7);
          }
          catch (JSONException localJSONException)
          {
            App.b(localJSONException);
          }
        case 1:
        case 3:
        }
      }
    }
    catch (SQLException localSQLException)
    {
      while (true)
      {
        this.d.a(localSQLException);
        localn1 = localn2;
        continue;
        String str8 = locall.c();
        localObject2 = str8;
        continue;
        if (!localJSONException.equals("read"))
          break;
        JSONObject localJSONObject11 = localJSONObject7.put("url", localObject2);
        String str11 = String.valueOf(localJSONObject2.length());
        JSONObject localJSONObject12 = localJSONObject2.put(str11, localJSONObject7);
      }
    }
    catch (IllegalStateException localIllegalStateException)
    {
      while (true)
      {
        Object localObject2;
        l locall;
        JSONObject localJSONObject7;
        label690: label704: this.d.a(localIllegalStateException);
        localn1 = localn2;
        continue;
        if (localJSONException.equals("delete"))
        {
          JSONObject localJSONObject13 = localJSONObject7.put("url", localObject2);
          String str12 = String.valueOf(localJSONObject3.length());
          JSONObject localJSONObject14 = localJSONObject3.put(str12, localJSONObject7);
          continue;
        }
        if (localJSONException.equals("title"))
        {
          JSONObject localJSONObject15 = localJSONObject7.put("url", localObject2);
          String str13 = locall.k();
          JSONObject localJSONObject16 = localJSONObject7.put("title", str13);
          String str14 = String.valueOf(localJSONObject4.length());
          JSONObject localJSONObject17 = localJSONObject4.put(str14, localJSONObject7);
          continue;
        }
        if (localJSONException.equals("tags"))
        {
          JSONObject localJSONObject18 = localJSONObject7.put("url", localObject2);
          String str15 = locall.o();
          JSONObject localJSONObject19 = localJSONObject7.put("tags", str15);
          String str16 = String.valueOf(localJSONObject5.length());
          JSONObject localJSONObject20 = localJSONObject5.put(str16, localJSONObject7);
          continue;
        }
        if (localJSONException.equals("scroll"))
        {
          JSONObject localJSONObject21 = localJSONObject7.put("url", localObject2);
          if (!locall.t())
            continue;
          JSONObject localJSONObject22 = locall.u();
          JSONObject localJSONObject23 = localJSONObject7.put("views", localJSONObject22);
          String str17 = String.valueOf(localJSONObject6.length());
          JSONObject localJSONObject24 = localJSONObject6.put(str17, localJSONObject7);
          continue;
        }
        boolean bool2 = localJSONException.equals("recat");
        continue;
        e locale = this.d.c;
        String[] arrayOfString = new String[1];
        String str18 = String.valueOf(localn1);
        arrayOfString[0] = str18;
        locale.a("DELETE FROM sync_queue WHERE rowid <= ?", arrayOfString);
        this.d.c.d();
        int i = 3;
        continue;
        i = -1;
        continue;
        label1075: i = 1;
      }
    }
    */
  }

@Override
protected Object doInBackground(Object... arg0) {
	// TODO Auto-generated method stub
	return null;
}
}

/* Location:           E:\AndroidDecompiler\jd-gui-0.3.3.windows\newrclasses.dex.dex2jar.jar
 * Qualified Name:     com.ideashower.readitlater.a.aa
 * JD-Core Version:    0.6.0
 */